<!--  -->
<script setup>
import { useI18n } from 'vue-i18n';
import { ref } from 'vue'
import { useUseStore } from '@/stores/user';
const { t } = useI18n();
const user = useUseStore();
import { Overlay } from 'vant';
//遮罩层
const showOverLay = ref(true);
</script>

<template>
    <div class="Tip">
        <van-overlay :show="showOverLay">
            <div class="mainBody">
                <h1>{{ $t('me.PersonalPosting.shop.tip.title') }}</h1>
                <div class="tip">
                    {{ $t('me.PersonalPosting.shop.tip.message') }}
                </div>
                <button class="btn" @click="showOverLay = false">{{ $t('me.PersonalPosting.shop.tip.ok') }}</button>
                <van-radio-group class="selectBtn">
                    <van-radio shape="square" name="true" @click="user.showTip = !user.showTip">{{
                        $t('me.PersonalPosting.shop.tip.cloMsg') }}</van-radio>
                </van-radio-group>
            </div>
        </van-overlay>
    </div>
</template>

<style  scoped lang="scss">
.Tip {
    width: 100vw;


    .mainBody {
        width: 350rem;
        position: absolute;
        background-color: white;
        border-radius: 5%;
        align-items: center;
        justify-content: center;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;

        h1 {
            margin-top: 8rem;
            font-size: 20rem;
            font-weight: bold;
        }

        .tip {
            padding-top: 2rem;
            margin-left: 10%;
            margin-right: 10%;
            display: flex;
            justify-content: center;
        }

        .btn {
            margin-top: 8rem;
            height: 40rem;
            font-size: 18rem;
            background-color: #58137a;
            color: white;
            width: 80%;
            border-radius: 20px;
        }

        .selectBtn {
            margin-left: 15%;
            margin-top: 8rem;
            margin-bottom: 8rem;
        }
    }
}
</style>
